package net.malkuth.test;

import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;

/**
 * Created by 一些年华 on 2016/7/8.
 */
public class RegisterActivity extends BaseNewActivity implements View.OnClickListener {
    private ImageButton mBack;
    private TextView title;
    private EditText mAccount;
    private EditText ed_code;
    private EditText mNewPwd;
    private Button mCode;
    private Button btn_existence;
    private Button btn_forget;

    private void init() {
        title = (TextView) findViewById(R.id.tv_title_bar);
        title.setText(R.string.bt_register);

        mBack = (ImageButton) findViewById(R.id.iv_back);
        mAccount = (EditText) findViewById(R.id.ed_account);
        ed_code = (EditText) findViewById(R.id.ed_code);
        mNewPwd = (EditText) findViewById(R.id.ed_new_pwd);
        mCode = (Button) findViewById(R.id.btn_getcode);
        btn_existence = (Button) findViewById(R.id.btn_existence);
        btn_forget = (Button) findViewById(R.id.btn_forget);

        mBack.setOnClickListener(this);
        mAccount.setOnClickListener(this);
        ed_code.setOnClickListener(this);
        mNewPwd.setOnClickListener(this);
        mCode.setOnClickListener(this);
        btn_existence.setOnClickListener(this);
        btn_forget.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_existence://已有账号
                finish();
                break;
            case R.id.btn_forget://忘记密码
                startActivity(new Intent(this, ForgetPwdActivity.class));
                finish();
                break;

            case R.id.iv_back:
                finish();
                break;
        }
    }

    @Override
    public void setupView() {
        init();
    }

    @Override
    public void setContent() {
        setContentView(R.layout.activity_register);
    }

    @Override
    public void setModel() {

    }

    @Override
    public boolean getIntentValue() {
        return true;
    }
}
